<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j"%>
<%@taglib prefix="rich" uri="http://richfaces.org/rich"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%--
    This file is an entry point for JavaServer Faces application.
--%>
<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
            <title>Máquinas</title>
        </head>
        <body>
            <h1><h:outputText value="Máquinas"/></h1>
        <h:form>
            <h:form>
                <rich:dataTable value="#{ListarTodasAsMaquinasBB.maquinas}" var="maquina" rows="5">
                    <rich:column sortBy="#{maquina.nome}" filterBy="#{maquina.nome}" filterEvent="onkeyup"filterValue="#{ListarTodasAsMaquinasBB.filtro}" >
                        <f:facet name="header" >
                            <h:outputText value="Nome" />
                        </f:facet>
                        <h:outputText value="#{maquina.nome}" />
                    </rich:column>
                    <rich:column sortBy="#{maquina.ip}" filterBy="#{maquina.ip}" filterEvent="onkeyup" filterValue="#{ListarTodasAsMaquinasBB.filtro}">
                        <f:facet name="header" >
                            <h:outputText value="IP" />
                        </f:facet>
                        <h:outputText value="#{maquina.ip}" />
                    </rich:column>
                    <rich:column sortBy="#{maquina.tamanhoMemoria}">
                        <f:facet name="header" >
                            <h:outputText value="Qtd. Memória" />
                        </f:facet>
                            <h:outputText value="#{maquina.tamanhoMemoria}" />
                    </rich:column>
                    <rich:column sortBy="#{maquina.tamanhoDisco}">
                            <f:facet name="header" >
                                <h:outputText value="Qtd. de Disco" />
                            </f:facet>
                            <h:outputText value="#{maquina.tamanhoDisco}" />
                   </rich:column>
                   <f:facet name="footer">
                      <rich:datascroller id="ds"></rich:datascroller>
                    </f:facet>
                </rich:dataTable>
            </h:form>
        </h:form>
        </body>
    </html>
</f:view>
